<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>ChartViewer.setImageMap</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="ChartViewer.htm">ChartViewer</a>.<wbr>setImageMap</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public void setImageMap(Strimg imageMap)
</div>
<p class="heading2">Description</p>
<div class="content">
Sets the image map that defines the hot spots on the chart image.<br><br>
The ChartViewer control expects the image map to be in HTML image map format comprising of HTML &lt;AREA&gt; tags. The <a href="BaseChart.getHTMLImageMap.htm">BaseChart.getHTMLImageMap</a> method can be used to automatically generate image maps for charts.<br><br>
The advantages of using HTML image map format is that it is easy for developers to customize the hot spots.<br><br>
For example, one can create custom buttons in the chart image by drawing custom text boxes, and then create custom image maps to define the text boxes as hot spots. These custom image maps can be appended to the image maps generated by <a href="BaseChart.getHTMLImageMap.htm">BaseChart.getHTMLImageMap</a> using simple string concatenation.<br><br>
The ChartViewer control will process the various attributes of the HTML &lt;AREA&gt; tags as follows:<br><br>
<div style="width:100%;box-sizing:border-box;"><table width="100%" border="1" cellpadding="5" cellspacing="0"> <tr><th width="38%">Attribute<th>Description <tr><td>coords<td>This attribute defines the position and shape of the hot spot.
<tr><td>href<td>The URL specified in this attribute will become the attributes of the hot spot. The path portion of the URL will become the path attribute, and the attributes/values of the query parameters will become the attributes/values of the hot spot. When a hot spot event occurs (eg. mouse click), the hot spot attributes will be passed to the event listener as a Hashtable.
<tr><td>title<td>This attribute defines the tool tip text to display when the mouse moves over and stops on the hot spot. If the mouse is not on top of any hot spot, the default SWING tool tip (set using setToolTipText of the JLabel class).
</table></div><br>
When the mouse pointer moves over a hot spot, it can change shape to provide user feedback. For example, it can change from an "arrow" to a "hand". The mouse pointers are configured using <a href="ChartViewer.setHotSpotCursor.htm">ChartViewer.setHotSpotCursor</a>.<br><br>
It is possible to define some hot spots as "silent" hot spots. For these hot spots, the the mouse pointer will not change shape. These are useful if the hot spots are for displaying tool tips only and not clickable.<br><br>
A hot spot is considered as silent if its &lt;AREA&gt; tag that has no href attribute, or an href attribute with an empty path (but can still contain query parameters), or the path starts with the "~" character.<br><br>
This method stores a reference to the image map string so that it can be retrieved later using <a href="ChartViewer.getImageMap.htm">ChartViewer.getImageMap</a>. However, ChartViewer internally does not need the image map string after parsing it with this method. In systems with very limited memory (such as embedded systems), if the image map string is not needed, the <a href="ChartViewer.disposeReference.htm">ChartViewer.disposeReference</a> may be used to dispose the reference, so that it may be garbage collected.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>imageMap</td><td>(Mandatory)</td><td>The image map that defines the hot spots.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
None
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
